package com.itcast.Service.ServiceImpl;

import com.itcast.Dao.PublicDao;
import com.itcast.Service.PublicService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class PublicServiceImpl implements PublicService, InitializingBean, DisposableBean {
    private PublicDao dao1;

    @Override
    public void destroy() throws Exception {
        System.out.println("destroy run");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("init run");
    }



    @Override
    public void save() {
        System.out.println("servicesave***");
        dao1.save();
    }

    public void setDao1(PublicDao dao1) {
        this.dao1 = dao1;
    }


}
